package edu.npu.cv.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import edu.npu.cv.enums.ArticleDeleteStatus;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName ArticleVO
 * @Description TODO
 * @Author Quentin_zyj
 * @Date 2021/11/23 20:28
 */
@Data
public class ArticleVO {

    private long articleId;

    private String title;

    private String coverImage;

    private String content;

    /** 分类id, 见{@link edu.npu.cv.enums.ArticleCategory}*/
    private long categoryId;

    /** 文章状态, 见{@link edu.npu.cv.enums.ArticleStatus} */
    private int status;

    /** 软删除状态, 见{@link edu.npu.cv.enums.ArticleDeleteStatus} */
    private int isDeleted = ArticleDeleteStatus.UNDELETED;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifyTime;

}
